/**
 * related to userDetail.ui
 * 
 * @Author : wmn1988@qq.com
 * @Timestamp : 2016-09-21
 */
var page = sm("do_Page");
var app = sm("do_App");
var global = sm("do_Global");
var nf = sm("do_Notification");
var hashdata = mm("do_HashData");
var root = ui("$");
var http = require("helper/http");
var imgTool = require("helper/picture");
var urlMall = require("url/mall");
var openHelper = require("helper/open");

//andriod返回键
page.on("back", function() {
    app.closePage();
});

page.on("loaded", function(){
	loadSupplierWeb();
});

var headerAout = ui("headerAout");
var addheader = headerAout.add("header", "source://view/reuse/header.ui", 0, 0);
var labelTitle = ui(addheader+".labelTitle");
labelTitle.text = "";
//左上角-返回
var headerLeft = ui(addheader+".headerLeft");
headerLeft.on("touch", function() {
    app.closePage();
});

function loadSupplierWeb(){
	var data = page.getData();
	if(data && data.url){
		if(data.url.indexOf("http://") >= 0){
			ui("do_WebView_1").url = data.url;
		}else{
			ui("do_WebView_1").url = "http://" + data.url;
		}
	}
};